home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
et
/
et3_0-a1.lha
/
et3
/
src
/
TextReader.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-26
|
2KB
|
98 lines
#ifndef TextReader_First
#ifdef __GNUG__
//pragma once
#pragma interface
#endif
#define TextReader_First
#include "Object.h"
#include "TextStyles.h"
#include "Font.h"
#include "Ink.h"
class StyledText;
class RunArray;
class VObject;
class membuf;
//---- TextReader_First --------------------------------------------------------------
class TextReader : public Object {
public:
MetaDef(TextReader);
TextReader(StyledText *st, CharStyle *cs, ParaStyle *ps);
~TextReader();
void Flush();
//---- contents
void Append(byte b);
//---- character properties
void SetFont(GrFont f);
void SetSize(int s);
void SetInk(Ink *i);
void SetFace(GrFace fc, int b);
void SetFace(GrFace fc);
void ToggleFace(GrFace fc);
GrFont GetFont();
int GetSize();
GrFace GetFace();
Ink *GetInk();
//---- paragraph properties
void SetParaProp(TxtParaProp what, int value);
void SetParaProp(ParaDesc &pd);
//---- graphic items
void InsertVObject(VObject *vop);
void InsertVisualMark(class VisualMark *vmp);
protected:
void FlushParaProp();
void FlushCharProp();
private:
StyledText *st;
RunArray *cstyles;
RunArray *pstyles;
int pos;
int runlen;
int paralen;
bool flushed;
GrFace face;
GrFont font;
Ink *ink;
int size;
ParaDesc paraProp;
};
//---- inlines ----------------------------------------------------------
inline GrFont TextReader::GetFont()
{
return font;
}
inline int TextReader::GetSize()
{
return size;
}
inline GrFace TextReader::GetFace()
{
return face;
}
inline Ink *TextReader::GetInk()
{
return ink;
}
#endif